

        <g:set var="entityName" value="${message(code: 'leave.label', default: 'Leave')}" />
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <th><g:message code="leave.label" default="leave" /></th>
                   	    
                            <th><g:message code="leave.teacher.label" default="Teacher" /></th>
                   	    
                            <g:sortableColumn property="startTime" title="${message(code: 'leave.startTime.label', default: 'Start Time')}" />
                        
                            <g:sortableColumn property="endTime" title="${message(code: 'leave.endTime.label', default: 'End Time')}" />
                        
                            <th><g:message code="leave.approver.label" default="Approver" /></th>
                            <th> </th>
                   	    
                         
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${leaveInstanceList}" status="i" var="leaveInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${leaveInstance.id}">${leaveInstance?.toTitle()}</g:link></td>
                        
                            <td>${fieldValue(bean: leaveInstance, field: "teacher")}</td>
                        
                            <td><g:formatDate date="${leaveInstance.startTime}"  formatName ="default.datetime.format"/></td>
                        
                            <td><g:formatDate date="${leaveInstance.endTime}" formatName ="default.datetime.format" /></td>
                        
                            <td>${fieldValue(bean: leaveInstance, field: "approver")}</td>
                            <td class="operate">
                           
                             <x:operate width="100">
                            <g:if test="${leaveInstance?.pass == null}">  
                                        <g:link  action="edit" id="${leaveInstance.id}"><g:message code="default.button.edit.label" default="修改" /></g:link>
                                        <g:link  action="delete" id="${leaveInstance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');"><g:message code="default.button.delete.label" default="delete" /></g:link>
                            </g:if>
                            <g:else>
                                已经批复
                            </g:else>
                            </x:operate>
                             </td>
                            
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${leaveInstanceTotal}" />
            </div>
